﻿Public Class Dictionaries
    Public Shared ReadOnly Property GetDialogeLocalization As ResourceDictionary
        Get
            Dim resourceLocalization As New ResourceDictionary
            resourceLocalization.Source = New Uri("pack://application:,,,/Biller;component/Localization/Dialoges-de.xaml")
            Return resourceLocalization
        End Get
    End Property

    Public Shared ReadOnly Property GetMainWindowLocalization As ResourceDictionary
        Get
            Dim resourceLocalization As New ResourceDictionary
            Dim lang As String = Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName
            Select Case lang
                Case "en"
                    resourceLocalization.Source = New Uri("pack://application:,,,/Biller;component/Localization/MainWindowStrings-en.xaml")
                Case "de"
                    resourceLocalization.Source = New Uri("pack://application:,,,/Biller;component/Localization/MainWindowStrings-de.xaml")
                Case Else
                    resourceLocalization.Source = New Uri("pack://application:,,,/Biller;component/Localization/MainWindowStrings-en.xaml")
            End Select
            Return resourceLocalization
        End Get
    End Property

    Public Shared ReadOnly Property GetOrderControlLocalization As ResourceDictionary
        Get
            Dim resourceLocalization As New ResourceDictionary
            resourceLocalization.Source = New Uri("pack://application:,,,/Biller;component/Controls/Auftrag/OrderControl_de-de.xaml")
            Return resourceLocalization
        End Get
    End Property
End Class
